{include file="include:header" /}
<body class="fixed-sidebar full-height-layout gray-bg" >
    <!-- 导航 -->
    <div class="row wrapper border-bottom white-bg page-heading order-serve-list">
        <div class="col-sm-4">
            <h2>服务列表</h2>
            <ol class="breadcrumb">
                <li><a href="{:url('admin/Index/home')}">主页</a></li>
                <li><a href="#">订单与服务</a></li>
                <li><strong>服务列表</strong></li>
            </ol>

        </div>
        <div class="col-sm-8 ">
            <div class="title-action form-inline" >
                <a href="{:url('/order/serve_any')}" class="btn btn-primary" >新增服务</a>
            </div>
        </div>
    </div>
    <!-- 内容 -->
   <div class="wrapper wrapper-content">
        <div class="row">
            <!-- 搜索部分 -->
            <div class="col-sm-6">
                <div class="panel panel-default" >
                    <div class="panel-heading">快速查询</div>
                    <div class="panel-body">
                        <form class="form-horizontal search-form" action="" method="get" id="transmit">
                            <div class="form-group">
                                <label class="col-xs-2 control-label">用户手机号</label>
                                <div class="col-xs-10 ">
                                    <input type="text" class="form-control" name="uid" value="{$post['uid']?$post['uid']:''}" placeholder="用户手机号">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-xs-2  control-label">订单状态</label>
                                <div class="col-xs-10 ">
                                    <select class="form-control m-b" name="co_state">
                                        <option value="">全部</option>
                                        {if condition="$post['co_state'] eq ''"}
                                        <option value="1">待受理</option>
                                        <option value="2">服务中</option>
                                        <option value="3">已结束</option>
                                        <option value="4">已取消</option>
                                        {else /}
                                        <option value="1" {eq name="$post['co_state']" value="1" }selected="selected" {/eq}>待受理</option>
                                        <option value="2" {eq name="$post['co_state']" value="2" }selected="selected" {/eq}>服务中</option>
                                        <option value="3" {eq name="$post['co_state']" value="3" }selected="selected" {/eq}>已结束</option>
                                        <option value="4" {eq name="$post['co_state']" value="4" }selected="selected" {/eq}>已取消</option>
                                        {/if}

                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-2 control-label">服务名称</label>
                                <div class="col-xs-10 ">
                                    <input type="text" class="form-control" name="co_name" value="{$post['co_name']?$post['co_name']:''}" placeholder="服务名称">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-xs-2 control-label">下单时间</label>
                                <div class="col-xs-10 ">
                                    <input  type="text" name="stime"  size="18" value="{$post.stime?$post.stime:''}" placeholder="开始" class=" form-control scinput" style="width: 140px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" />&nbsp;&nbsp;
                                    <br/><input type="text" name="otime" size="18" value="{$post.otime?$post.otime:''}" placeholder="结束" class=" form-control scinput" style="width: 140px;" onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" />
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <a href="javascript:;" ><input type="submit" value="搜索" class="search-btn mg-right-10 col-xs-offset-4 btn btn-primary consult-data" /></a>
                            &nbsp;&nbsp;
                        </form>
                    </div>
                </div>
            </div>
            
        </div>
            <table class="table table-bordered white-bg">
                <thead>
                    <tr>
                        <th>服务号</th>
                        <th>用户昵称</th>
                        <th>服务名称</th>
                        <th>服务年限与金额</th>
                        <th>服务状态</th>
                        <th>下单时间</th>
                        <th>服务开始与结束时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                   {volist name="list" id="v"}
                   <tr>
                        <td>{$v['co_no']}</td>
                        <td><span class="btn btn-xs btn-primary">{$v['u_nickname']?$v['u_nickname']:$v['u_phone']}</span></td>
                        <td>{$v['co_name']}</td>
                        <td>年限：<font color="red">{$v['co_age_limit']}</font>
                            <br/>
                            金额：<font color="red">{$v['co_money']}</font>
                        </td>
                        <td>
                            {if condition="$v['co_state'] eq 1"}<span class="btn btn-xs  btn-danger">待受理
                            {elseif condition="$v['co_state'] eq 2"/}<span class="btn btn-xs btn-success">服务中
                            {elseif condition="$v['co_state'] eq 3"/}<span class="btn btn-xs btn-primary">已结束
                            {else/}<span class="btn btn-xs btn-link">已取消
                            {/if}
                           </span>
                        </td>
                       <td>{$v['co_addtime']}</td>
                        <td>开始：{neq name="$v['co_begintime']" value="0000-00-00 00:00:00"}<font color="red">{$v['co_begintime']}</font>{/neq}<br/>结束：
                            {neq name="$v['co_finishtime']" value="0000-00-00 00:00:00"}<font color="blue">{$v['co_finishtime']}</font>{/neq}
                        </td>
                        <td>
                            <a class="btn-primary btn-xs btn btn-outline" href="{:url('admin/Order/serve_details',array('counselor_order_id'=>$v['counselor_order_id']))}">查看详情</a>
						</td>
                    </tr> 
                 {/volist}
                </tbody>
            </table>
            <div class="btn-group">{$page}</div>
    </div>
</body>
</html>
{include file="include:js" /}
